floxbox: Fix focus navigation
authorMatthias Clasen <mclasen@redhat.com>
Sun, 23 May 2021 14:25:11 +0000 (10:25 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 23 May 2021 15:20:00 +0000 (11:20 -0400)
We want to find focusable children, so we need to look at
the focusable property, not at can-focus. This is a change
from GTK 3, where can-focus was the correct property to
look at.

gtk/gtkflowbox.c

index d994e69d08340a72326e0764131a3432e5c691f5..188b76c562290dbee01c8473bbd1794147d64630 100644 (file)
@@ -337,8 +337,8 @@ gtk_flow_box_child_focus (GtkWidget        *widget,
   GtkWidget *child = priv->child;
   gboolean had_focus = FALSE;
 
-  /* Without "can-focus" flag try to pass the focus to the child immediately */
-  if (!gtk_widget_get_can_focus (widget))
+  /* Without "focusable" flag try to pass the focus to the child immediately */
+  if (!gtk_widget_get_focusable (widget))
     {
       if (child)
         {
@@ -3383,10 +3383,10 @@ gtk_flow_box_move_cursor (GtkFlowBox      *box,
       return TRUE;
     }
 
-  /* If the child has its "can-focus" property set to FALSE then it will
+  /* If the child has its "focusable" property set to FALSE then it will
    * not grab the focus. We must pass the focus to its child directly.
    */
-  if (!gtk_widget_get_can_focus (GTK_WIDGET (child)))
+  if (!gtk_widget_get_focusable (GTK_WIDGET (child)))
     {
       GtkWidget *subchild;